#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include <cmath>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
    int n = 0;
    long double d = 0.0;
    cin >> n >> d;
    d *= pow(2, n);
    string s1(to_string(d));
    int upin = 0;
    for (int i = s1.size() - 1; s1[i] != '.'; )
    {
        s1[i] += upin;
        upin = 0;
        if (s1[i] >= '5')
        {
            upin = 1;
        }
        s1.pop_back();
        --i;
    }
    s1.pop_back();
    int re = stoi(s1) + upin;

    cout << re;
    return 0;
}